#include <algorithm/shared/data/scene/Receiver.h>
#include <algorithm/shared/data/topology/geometry/Rectangle.h>
#include <algorithm/shared/data/topology/material/Absorb.h>

#include <utility>

using namespace solar;

std::atomic_int Receiver::receiver_cnt_ = 0;

solar::Receiver::Receiver()
{
    id_ = -1;
    geometry_ = std::make_shared<Rectangle>();
    material_ = std::make_shared<Absorb>();
}

#include <utils/class_describe_source.inc>

Receiver::Receiver(Receiver&& another) noexcept
    : id_(another.id_), material_(std::move(another.material_)),
      geometry_(std::move(another.geometry_))
{
}

auto Receiver::operator=(Receiver&& another) noexcept -> Receiver& 
{
    this->id_ = another.id_;
    this->material_ = std::move(another.material_);
    this->geometry_ = std::move(another.geometry_);
    return *this;
}
